﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XMLSpreadGear.Core;

namespace XMLSpreadGear.Templates
{
    public class SmartTags:BaseElement
    {
        public SmartTags(string strLocalname)
            : base(strLocalname)
        {
        }
        public SmartTags(string strLocalname, GenericElement smarttag)
            : this(strLocalname)
        {
            this.egSmartTag = smarttag;
        }
        private GenericElement egSmartTag;

        public GenericElement SmartTag
        {
            get { return egSmartTag; }
            set { egSmartTag = value; }
        }

        internal protected override IDictionary<string, string> RegisterElements()
        {
            IDictionary<string, string> dic = new Dictionary<string, string>();
            if(this.SmartTag !=null)
                dic.Add("SmartTag", this.SmartTag.ToString());
            return dic;

        }

        internal protected override IDictionary<string, string> RegisterAttributes()
        {
            return new Dictionary<string, string>(); 
        }

        protected override void SetDefaults()
        {
            return;
        }
    }
}
